﻿@model Chaine.Models.ChangePasswordModel

@{
    ViewBag.Title = "Reset Password";
    Layout = "~/Views/Shared/_NoAuthen.cshtml";
}
@section maincontent{
<div class=" container  hero-unit  " style="margin-top: 40px;width:400px;">
    <h2>Reset Password</h2>
    @if (TempData["error"] != null)
    {
            <div class="alert  alert-error">
                            @TempData["error"]
           </div>
    }else{
        using (Html.BeginForm())
        {
          @ViewData["username"]
          @Html.ValidationSummary(true, "please input the right password info!");
        <div class="well">
                        <!-- 获取username，传递至下一个页面 -->
                        @Html.Hidden("username", @ViewData["username"])
                        <!-- 该页面无需验证oldpassword -->
                        @Html.HiddenFor(m => m.OldPassword)

                        <div class="editor-label">
                            @Html.LabelFor(m => m.NewPassword)
                        </div>
                        <div class="editor-field">
                            @Html.PasswordFor(m => m.NewPassword)
                            @Html.ValidationMessageFor(m => m.NewPassword)
                        </div>

                        <div class="editor-label">
                            @Html.LabelFor(m => m.ConfirmPassword)
                        </div>
                        <div class="editor-field">
                            @Html.PasswordFor(m => m.ConfirmPassword)
                            @Html.ValidationMessageFor(m => m.ConfirmPassword)
                        </div>
                           
                         <br />
                         <br />
                        <input type="submit" value="submit" class="btn btn-primary btn-large" />
        </div>
        }   
    }
</div>
}
